import axios from '/@/utils/request';
import { MethodEnum } from '/@/utils/request/enum/MethodEnum';
import { HttpConfig } from '/src/utils/request/type/AxiosModel';
import { LoginParam, LoginUserVO, CaptchaVO } from '/@/api/auth/login/types';

/**
 *
 * 登录
 */
export function login(data: LoginParam, config?: HttpConfig): Promise<LoginUserVO> {
  return axios.httpRequest('/auth/login', MethodEnum.POST, data, config);
}
/**
 * 接口注释
 */
export function k(config?: HttpConfig): Promise<void> {
  return axios.httpRequest('/auth/login', MethodEnum.PUT, {}, config);
}
/**
 * 获取验证码
 */
export function getCaptcha(config?: HttpConfig): Promise<CaptchaVO> {
  return axios.httpRequest('/auth/login/getCaptcha', MethodEnum.GET, {}, config);
}
